Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Store): dispatch one update action when multiple features are added or removed #1240

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

timdeschryver
Copy link
Member

@timdeschryver timdeschryver commented Aug 11, 2018

Closes #1238

BREAKING CHANGE:

BEFORE:
When adding/removing one feature:

{type: '@ngrx/store/update-reducers', feature: 'feat1'}

When adding/removing multiple features:

{type: '@ngrx/store/update-reducers', feature: 'feat1'}
{type: '@ngrx/store/update-reducers', feature: 'feat2'}

AFTER:
When adding/removing one feature:

{type: '@ngrx/store/update-reducers', features: ['feat1']}

When adding/removing multiple features:

{type: '@ngrx/store/update-reducers', features: ['feat1', 'feat2']}

@coveralls
Copy link

coveralls commented Aug 11, 2018

Coverage Status

Coverage decreased (-0.003%) to 88.615% when pulling d2d9682 on timdeschryver:pr/update-features into 0c26a95 on ngrx:master.

this.dispatcher.next(<Action>{
type: UPDATE,
feature,
feature: featureKeys[0],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be an array dispatched either way, with one more feature keys in the array.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 got it, so always a features array. I'll update it tomorrow.

…ded or removed

BREAKING CHANGE:

BEFORE:
```ts
{type: '@ngrx/store/update-reducers', feature: 'feature1'}
{type: '@ngrx/store/update-reducers', feature: 'feature2'}
```

AFTER:
```ts
{type: '@ngrx/store/update-reducers', features: ['feature1',
'feature2']}
```
@brandonroberts brandonroberts merged commit 0b90f91 into ngrx:master Aug 16, 2018
@timdeschryver timdeschryver deleted the pr/update-features branch August 16, 2018 12:28
@govi2010
Copy link

govi2010 commented Feb 3, 2020

Issue still there for Version 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dispatch a single action when features are loaded
4 participants